﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DomainInfoLib
{
    public class RegisterInfo
    {
        public string DomainName { get; set; }

        public bool? Avaliable { get; set; }

        public string Response { get; set; }

        public DateTime QueryDate { get; set; }

        public string APIName { get; set; }


        public static RegisterInfo BuildRegisterInfo(string DomainName, string xmlstr, bool? Avaliable, string theAPIName)
        {
            RegisterInfo registerInfo = new RegisterInfo
            {
                DomainName = DomainName
                   ,
                Response = xmlstr
                   ,
                Avaliable = Avaliable.Value
                   ,
                QueryDate = DateTime.Today
                                   ,
                APIName = theAPIName
            };

            return registerInfo;
        }
    }
}
